package libs.yzx.zaza.acts2;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

import libs.yzx.zaza.R;

/**
 * Created by Administrator on 2016/10/12.
 */

public class Height_MeasureHeightActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_height_measureheight);

        final View view = findViewById(R.id.view);
        view .post(new Runnable() {
            public void run() {

                Toast.makeText(Height_MeasureHeightActivity.this, ""+view.getHeight(), Toast.LENGTH_SHORT).show();
                Toast.makeText(Height_MeasureHeightActivity.this, ""+view.getMeasuredHeight(), Toast.LENGTH_SHORT).show();

                //getHeight  和 getMeasuredHeight 总是相等...

            }
        });

    }

}
